<table id ='ListOfComponents' "cellspacing="0" class="sf_admin_list">            
       <thead>
            <tr>
                  <th id="sf_admin_list_th_productcode" width="20%">Product Code
                          </th>
                  <th id="sf_admin_list_th_description" width="30%">Description
                          </th>
                  <th id="sf_admin_list_th_description" width="20%">Brand
                          </th>
                  <th id="sf_admin_list_th_description" width="10%">Unit
                          </th>
                  <th id="sf_admin_list_th_description" width="15%">Closing
                          </th>
                  <th id="sf_admin_list_th_description" width="5%">Add
                          </th>
            </tr>
       </thead>            

<?php foreach($componentList as $key=>$component):
    $c = new Criteria();
    $c->add(WarehousePeer::COMPONENT_ID, $component->getId());
    $warehouse = WarehousePeer::doSelectOne($c); ?>
    <tr class="sf_admin_row_<?php echo $key % 2; ?>">
        <td ><?php echo $component->getProductcode() ?></td>
        <td ><?php echo $component->getDescription() ?></td>
        <td ><?php echo $component->getBrand() ?></td>
        <td ><?php echo $component->getComponentunit()?></td>
        <td ><?php echo $warehouse->getClosing()?></td>
        <td ><input type="checkbox" name = "components" id ="components" class ="ChkboxComponents" rowId="<? echo $component->getId() ?>"></td>
    </tr>
<?php endforeach;?>
</table>
<?php foreach($componentList as $component){ 
    $c = new Criteria();
    $c->add(WarehousePeer::COMPONENT_ID , $component->getId());
    $warehouse = WarehousePeer::doSelectOne($c);
?>
    <?php 
        echo '<input type="hidden" name="productCode[' . $component->getId() . ']" id="productCode_' . $component->getId() . '"  value="'. $component->getProductcode() .'" />'; 
        echo '<input type="hidden" name="description[' . $component->getId() . ']" id="description_' . $component->getId() . '"  value="'. $component->getDescription() .'" />'; 
        echo '<input type="hidden" name="brand[' . $component->getId() . ']" id="brand_' . $component->getId() . '"  value="'. $component->getBrand() .'" />';
        echo '<input type="hidden" name="unit[' . $component->getId() . ']" id="unit_' . $component->getId() . '"  value="'. $component->getComponentunit() .'" />';
        echo '<input type="hidden" name="minStockQty[' . $component->getId() . ']" id="minStockQty_' . $component->getId() . '"  value="'. $component->getMinstockqty() .'" />';
        echo '<input type="hidden" name="stockQty[' . $component->getId() . ']" id="stockQty_' . $component->getId() . '"  value="'. $warehouse->getClosing() .'" />';
    ?>
<?php }?>

